package com.nbsaas.boot.product.rest.convert;

import com.nbsaas.boot.product.data.entity.ProductSpecification;
import com.nbsaas.boot.product.api.domain.request.ProductSpecificationRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 商品规格请求对象转换成实体对象
*/

public class ProductSpecificationEntityConvert  implements Converter<ProductSpecification, ProductSpecificationRequest> {

    @Override
    public ProductSpecification convert(ProductSpecificationRequest source) {
        ProductSpecification result = new ProductSpecification();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

